WPF and Silverlight Edition Basic Library > RadialMenu > RadialMenu Elements > Creating RadialMenus |
Using the C1RadialMenu control, you can create both top-level menus and submenus. Creating either type of menu is easy with C1RadialMenu:
Complete the following steps to create a top-level menu:
XAML Copy Code <Xaml:C1ContextMenuService.ContextMenu> <Xaml:C1RadialMenu > </Xaml:C1RadialMenu> </Xaml:C1ContextMenuService.ContextMenu>The C1RadialMenu control is within a ContextMenuService. When you run your application, the menu will appear when you right-click or right-tap.
XAML Copy Code <Xaml:C1RadialMenuItem Header="RadialMenuItem1" /> <Xaml:C1RadialMenuItem Header="RadialMenuItem2" /> <Xaml:C1RadialMenuItem Header="RadialMenuItem3" />
Your top-level menu should resemble the following image:
Complete the following steps to create a submenu that's attached to one of a C1RadialMenu's items:
XAML Copy Code <Xaml:C1ContextMenuService.ContextMenu> <Xaml:C1RadialMenu > </Xaml:C1RadialMenu> </Xaml:C1ContextMenuService.ContextMenu>
XAML Copy Code <Xaml:C1RadialMenuItem Header="Tap Here" > <Xaml:C1RadialMenuItem Header="Item 1" /> <Xaml:C1RadialMenuItem Header="Item 2" /> <Xaml:C1RadialMenuItem Header="Item 3" /> </Xaml:C1RadialMenuItem>
This is the C1RadialMenu control after you tap or click the Tap Here item: